package xyz.lne.researchgroupmanage.entity;

import java.util.Date;
import com.baomidou.mybatisplus.annotation.Version;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import xyz.lne.researchgroupmanage.service.dataTransferObject.UserCommitTaskDTO;

/**
 * <p>
 * 
 * </p>
 *
 * @author team7
 * @since 2021-01-19
 */
@Data
@NoArgsConstructor
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="TaskUser对象", description="")
public class TaskUser implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "任务id")
    private Integer taskId;

    @ApiModelProperty(value = "用户id")
    private Integer userId;

    @ApiModelProperty(value = "提交内容")
    private String content;

    @ApiModelProperty(value = "提交任务的时间")
    private Date commitTime;

    @ApiModelProperty(value = "文件id")
    private Integer fileId;

    @ApiModelProperty(value = "任务备注")
    private String remark;

    @ApiModelProperty(value = "任务状态(0已接受但未完成 1已接受且已完成 2已拒绝)")
    private Integer status;


    public TaskUser(Integer taskId, Integer userId) {
        this.taskId=taskId;
        this.userId=userId;
        this.content="空";
        this.commitTime=new Date();
        this.fileId=0;
        this.remark="空";
        this.status=0;
    }

    public TaskUser(UserCommitTaskDTO userCommitTaskDTO){
        this.taskId=userCommitTaskDTO.getTaskId();
        this.userId=userCommitTaskDTO.getCommitUserId();
        this.content=userCommitTaskDTO.getCommitContent();
        this.commitTime=userCommitTaskDTO.getCommitTime();
        this.fileId=userCommitTaskDTO.getCommitFileId();
        this.remark= userCommitTaskDTO.getRemark();
        this.status= userCommitTaskDTO.getStatus();
    }

}
